/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package conn;

/**
 *
 * @author jm1156
 */
public class EMISConnection extends DatabaseConnection {

    private static EMISConnection instance;

    private EMISConnection() {
        super("mysql",
                "66.197.136.195",
                "3306",
                "emisredb_trusted",
                "emisredb_emis",
                "trusted");
    }

    public static EMISConnection getInstance() {
        if(instance == null)
            instance = new EMISConnection();
        return instance;
    }
    

//    public static void main(String[] args) {
//        EMISConnection emisConnection = new EMISConnection();
//        System.out.println("Able to connect: " + emisConnection.connect());
//        System.out.println("Connection: " + emisConnection.getConnection());
//
//        Person person = new Person();
//        person.setDateOfBirth(new Timestamp(2011, 07, 26, 0,0,0,0));
//        person.setEmail("haha@haha.com");
//        person.setFirstName("Jason");
//        person.setLastName("Bell");
//        person.setSexID(0);
//        person.setSSN(123456789);
//
//        PersonDao personDao = new PersonDao();
//        try {
//            personDao.create(emisConnection.getConnection(), person);
//        } catch (SQLException ex) {
//            ex.printStackTrace();
//        }
//    }
}
